<?php
	require_once ("../../config.inc.php");
	require_once ("../../include/mysql.inc.php");
	require_once ("../../include/feed.inc.php");
	$feedDao = new Feed();
	
	$id = $_GET("id");
	$email = $_GET("email");
	$dom = new DOMDocument("1.0","UTF-8");
	$result = '';
	
	if($feedDao->validate($id, $email)) {
		$result = $dom->createElement("result", 1);//成功验证
	}
	else {
		$result = $dom->createElement("result", 0);//成功失败
	}
	
	$dom->appendChild($result);
	header("Content-type:text/xml");
	$xmlfile = $dom->saveXML();
	file_put_contents("../../xml_data/feedValid.xml",$xmlfile);
	echo $xmlfile;
?>